﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Default.Master" AutoEventWireup="true"
    CodeBehind="Register.aspx.cs" Inherits="TPCN.Accounts.Register" %>

<asp:Content ID="head" ContentPlaceHolderID="head" runat="server">
    <link href="../App_Themes/Admincp/messages.css" rel="stylesheet" type="text/css" />
    <link href="../App_Themes/Admincp/forms.css" rel="stylesheet" type="text/css" />
</asp:Content>
<asp:Content ID="content" ContentPlaceHolderID="content" runat="server">
    <div class="box">
        <div class="boxtitle">
            Đăng kí thành viên
        </div>
        <div class="boxcontent">
            <asp:Panel ID="registerpanel" runat="server">
                <div class="center-align">
                    <div class="register-box">
                        <div class="message-error">
                            <asp:ValidationSummary ID="ValidationSummary1" runat="server" CssClass="message error"
                                DisplayMode="List" />
                        </div>
                        <div class="register-title">
                            Đăng ký
                        </div>
                        <div class="register-row">
                            <div class="register-label">
                                <asp:Label ID="Label1" runat="server" AssociatedControlID="txtHovaten">Họ và tên:</asp:Label>
                            </div>
                            <div class="register-control">
                                <asp:TextBox ID="txtHovaten" runat="server"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtHovaten"
                                    ErrorMessage="Tên không được để trống">*</asp:RequiredFieldValidator>
                            </div>
                        </div>
                        <div class="register-row">
                            <div class="register-label">
                                <asp:Label ID="EmailLabel" runat="server" AssociatedControlID="Email">E-mail:</asp:Label>
                            </div>
                            <div class="register-control">
                                <asp:TextBox ID="Email" runat="server"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="EmailRequired" runat="server" ControlToValidate="Email"
                                    ErrorMessage="Email không được để trống" ToolTip="E-mail is required.">*</asp:RequiredFieldValidator>
                                <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
                                    ControlToValidate="Email" ErrorMessage="Email không hợp lệ" 
                                    ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*">*</asp:RegularExpressionValidator>
                            </div>
                        </div>
                        <div class="register-row">
                            <div class="register-label">
                                <asp:Label ID="PasswordLabel" runat="server" AssociatedControlID="Password">Mật khẩu</asp:Label>
                            </div>
                            <div class="register-control">
                                <asp:TextBox ID="Password" runat="server" TextMode="Password"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="PasswordRequired" runat="server" ControlToValidate="Password"
                                    ErrorMessage="Mật khẩu không được để trống" ToolTip="Password is required.">*</asp:RequiredFieldValidator>
                                <asp:CustomValidator ID="CustomValidator1" runat="server" 
                                    ControlToValidate="Password" ErrorMessage="Mật khẩu phải nhiều hơn 5 kí tự" 
                                    onservervalidate="CustomValidator1_ServerValidate" SetFocusOnError="True">*</asp:CustomValidator>
                            </div>
                        </div>
                        <div class="register-row">
                            <div class="register-label">
                                <asp:Label ID="ConfirmPasswordLabel" runat="server" AssociatedControlID="ConfirmPassword">Nhập lại mật khẩu</asp:Label>
                            </div>
                            <div class="register-control">
                                <asp:TextBox ID="ConfirmPassword" runat="server" TextMode="Password"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="ConfirmPasswordRequired" runat="server" ControlToValidate="ConfirmPassword"
                                    ErrorMessage="Xác nhận mật khẩu không được để trống" ToolTip="Confirm Password is required.">*</asp:RequiredFieldValidator>
                                <asp:CompareValidator ID="PasswordCompare" runat="server" ControlToCompare="Password"
                                    ControlToValidate="ConfirmPassword" Display="Dynamic" ErrorMessage="Xác nhận mật khẩu không chính xác">*</asp:CompareValidator>
                            </div>
                        </div>
                        <div>
                            <div class="message-error center-align">
                                <asp:Literal ID="lblError" runat="server" EnableViewState="False"></asp:Literal>
                            </div>
                        </div>
                        <div class="register-row">
                            <div class="buttonpanel">
                                <asp:Button ID="btnRegister" CssClass="button button-blue" runat="server" Text="Đăng kí"
                                    OnClick="btnRegister_Click" />
                            </div>
                        </div>
                    </div>
                </div>
            </asp:Panel>
            <asp:Panel ID="successpanel" Visible="False" runat="server">
                <div class="register-box">
                    <div class="message info">
                        <h3>
                            Chúc mừng</h3>
                        <p>
                            Tài khoản của bạn đã được đăng ký thành công!</p>
                    </div>
                    <div class="continuebutton">
                        <asp:Button ID="ContinueButton" runat="server" CausesValidation="False" CssClass="button button-blue"
                            CommandName="Continue" Text="Tiếp tục" onclick="ContinueButton_Click" />
                    </div>
                </div>
            </asp:Panel>
        </div>
    </div>
</asp:Content>
